<?php

namespace App\Store\Services\Log;

use Illuminate\Http\Request;
use App\Store\Models\Sysset\LogLogin as ModelsSyssetLogLogin;
use App\Common\Services\Store\Common as StoreCommon;
class LogLogin
{
    
    public static function savelog(Request $request,$login_res,$cp_id=0,$account_id=0){


        $data=[
            'cp_id'=>intval($cp_id),
            'account_name'=>isset($request->account_name)?$request->account_name:'',
            'client_ip'=>$request->ip(),
            'login_at'=>time(),
            'login_res'=>$login_res,
            'account_id'=>$account_id,
        ];
        ModelsSyssetLogLogin::create($data);
    }
}